# $Id: PKGBUILD 184011 2013-04-30 20:11:04Z jgc $
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=gstreamer0.10
pkgver=0.10.36
pkgrel=2
pkgdesc="GStreamer Multimedia Framework"
arch=('i686' 'x86_64')
license=('LGPL')
url="http://gstreamer.com"
depends=('libxml2' 'glib2')
optdepends=('sh: feedback script')
makedepends=('intltool' 'pkgconfig' 'gtk-doc' 'gobject-introspection' 'git')
options=('!libtool')
source=("git://anongit.freedesktop.org/gstreamer-sdk/gstreamer#commit=ce96cff8e2bf1772dc330387fa98e94f187fc2ab"
        tests-remove-silly-test_fail_abstract_new-check.patch)
sha256sums=('SKIP'
            'd3d3f4f04453831fdb4244bfe174a38c4e6f9f4da5c8c9050dcfa1a6097aad52')

build() {
  cd "${srcdir}/gstreamer"
  patch -Np1 -i ../tests-remove-silly-test_fail_abstract_new-check.patch
  sed -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' -i configure.ac
  NOCONFIGURE=1 ./autogen.sh
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib \
    --with-package-name="GStreamer (Archlinux)" \
    --with-package-origin="http://www.archlinux.org/" \
    --enable-gtk-doc --disable-static
  make
}

check() {
  cd "${srcdir}/gstreamer"
  make check
}

package() {
  cd "${srcdir}/gstreamer"
  make DESTDIR="${pkgdir}" install

  #Remove unversioned gst-* binaries to get rid of conflicts
  cd "${pkgdir}/usr/bin"
  for bins in `ls *-0.10`; do
    rm -f ${bins/-0.10/}
  done
}
